package com.relax.shiwu;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

@Service
public class StudentMapper {
    @Autowired
    private JdbcTemplate jdbcTemplate;


    void update(Integer id, String name) {
        String sql = "update student set name =? where id = ?";
        jdbcTemplate.update(sql, name, id);
    }
}
